<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="com.sundy.core.*"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	Context context = Utility.obtainContext(request);
	String title = (String) request.getAttribute("title");
	title = title == null ? "" : title;
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>
		<base href="<%=basePath%>">
		<title><%=Common.webTitle%> <%=title%></title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="<%=Common.webDescription%>">
		<meta http-equiv="description" content="<%=Common.webDescription%>">
		
		<link rel="stylesheet" type="text/css" href="<%=path%>/css/main.css" />
		<script type="text/javascript" src="<%=path%>/js/jquery.js">
		</script>
		<link href="<%=path%>/css/ui-lightness/jquery-ui-1.8.7.custom.css"
			rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="<%=path%>/js/jquery-1.4.4.min.js">
		</script>
		<script type="text/javascript"
			src="<%=path%>/js/jquery-ui-1.8.8.custom.min.js">
		</script>
		<script type="text/javascript">
function gohome() {
	window.location.href = "<%=request.getContextPath()%>";
}
</script>
	</head>

	<body>
		<div id="head">
			<%
				if (context.getCurrentUser() == null) {
			%>
			<span class="left" style="cursor: pointer;" onclick="gohome();"><%=Common.webTitle%></span>
			<div id="time">
				<%=Utility.getDate()%></div>
			<%
				} else {
			%>
			<span class="left" style="cursor: pointer;" onclick="gohome();"><%=Common.webTitle%></span>
			<div id="time">
				<img src="<%=request.getContextPath() %>/image/user.png"/><a href="<%=request.getContextPath()%>/mgr/myspace"><%=context.getCurrentUser().getName()%></a>&nbsp;
				<a href="<%=request.getContextPath()%>/logout">注销</a>&nbsp;
				<%=Utility.getDate()%></div>
			<%
				}
			%>
		</div>